package org.nanfang.shuiguo01;

//男孩  -- 线程
public class BoyThread extends Thread{

    public BoyThread (){
        super();
    }
    public BoyThread(Box box, String name) {
        this.box = box;
        this.name = name;
    }
    private Box box;
    //    男孩的姓名
    private String name;
    @Override
    public void run() {
        while (true){
          Fruit fruit = new Fruit();
          box.put(name,fruit);
        }
    }
}
